const {
  override,
  adjustStyleLoaders,
  fixBabelImports,
} = require("customize-cra");
module.exports = override(
  //antd按需引入的配置
  fixBabelImports("import", {
    libraryName: "antd",
    libraryDirectory: "es",
    style: "css",
  }),
  // ...其他配置...
  adjustStyleLoaders((rule) => {
    //scss全局样式的配置
    if (rule.test.toString().includes("scss")) {
      rule.use.push({
        loader: require.resolve("sass-resources-loader"),
        options: {
          resources: "./src/styles/main.scss", //这里是你自己放公共scss变量的路径
        },
      });
    }
  })
  // ...其他配置...
);
